package com.entity;

import javax.persistence.*;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.*;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 【车辆管理】 保险情况
 */

@Entity
@Table(name = "vehicle_insurance")
@Getter @Setter @NoArgsConstructor
public class VehicleInsurance extends BaseEntity {

    private String plateNumber;

    @Column(name = "start_date", nullable = false)
    @Temporal(TemporalType.DATE)
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date startDate;

    @Column(name = "end_date")
    @Temporal(TemporalType.DATE)
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date endDate;

    @Column(name = "premium", nullable = false, precision = 10, scale = 2)
    private BigDecimal premium;

    @Column(name = "remark", length = 500)
    private String remark;

}